package org.dao.imp;

import javax.jms.Session;
import javax.transaction.Transaction;

import org.dao.DlDao;
import org.model.Dlb;
import org.springframework.orm.toplink.SessionFactory;

public class DlDaoImp implements DlDao{
	private SessionFactory sessionFactory;
	public void setSessionFactory(SessionFactory sessionFactory){
		this.sessionFactory=sessionFactory;
	}
	public void save(Dlb dl){
		try{
			Session session=sessionFactory.openSession();
			Transaction ts=session.beginTransaction();
			session.save(dl);
			ts.commit();
		}catch(Exception e){
			e.printStackTrace();
		}
	}
}